<?php
    include_once("../../Functions/connectDatabase.php");
    get_connection();
        $id = $_REQUEST["id"];
            $sql = "DELETE FROM review WHERE review_id='$id'";
            if (mysqli_query($conn, $sql)) {
                echo "<script>alert('删除成功！');window.location.href = document.referrer;</script>";
            } else {
                $error = mysqli_error($conn);
                $error = str_replace('\'', '', $error);
                echo "<script>alert('删除失败！');window.location.href = document.referrer;</script>";
            }
    close_connection();
?>
